import request from "@/utils/request";

// 查询防火墙策略列表
export function listStrategy(query) {
  return request({
    url: "/experiment/strategy/list",
    method: "get",
    params: query,
  });
}

// 查询防火墙策略详细
export function getStrategy(firewallStrategyId) {
  return request({
    url: "/experiment/strategy/" + firewallStrategyId,
    method: "get",
  });
}

// 新增防火墙策略
export function addStrategy(data) {
  return request({
    url: "/experiment/strategy",
    method: "post",
    data: data,
  });
}

// 修改防火墙策略
export function updateStrategy(data) {
  return request({
    url: "/experiment/strategy",
    method: "put",
    data: data,
  });
}

// 删除防火墙策略
export function delStrategy(firewallStrategyId) {
  return request({
    url: "/experiment/strategy/" + firewallStrategyId,
    method: "delete",
  });
}

//获取防火墙规则列表
export function getFireRule() {
  return request({
    url: "/experiment/rule/getList",
    method: "get",
  });
}
